package testing;

import javax.swing.DefaultListModel;
import javax.swing.JList;
import javax.swing.JOptionPane;

public class Testing {

    public static void main(String[] args){
        DefaultListModel a = new DefaultListModel();
        a.addElement("haha");
        a.addElement("okok");
        JList aList = new JList(a);
        System.out.println(aList.getModel().toString());

        a.addElement("asdf");
        System.out.println(aList.getModel().toString());
    }
    
}
